package com.itheima.Demo01.demo03;

import java.util.Set;
import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        Set<Student> set = new TreeSet<>();
//        Set<Student> set2 = new TreeSet<>();
        Student s1 = new Student("张三",60);
        Student s2 = new Student("aa啊四",30);
        Student s3 = new Student("别五",30);
        Student s4 = new Student("吃六",30);
        Student s5 = new Student("aa吃六",30);
        set.add(s1);
        set.add(s2);
        set.add(s3);
        set.add(s4);
        set.add(s5);
        for (Student stu : set) {
            System.out.println(stu);

        }


        System.out.println(set);
    }
}
